home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF & Cyberdog / ODFCyberLibrary / Sources / SLCyPart.idl < prev    next >
Encoding:
Text File  |  1996-08-16  |  1.8 KB  |  69 lines  |  [TEXT/MPS ]

  1. //-----------------------------------------------------------------------------
  2. //    SLCyPart.idl
  3. //    Support for CyberPartExtension. Subclass of CyberPartExtension,
  4. //     which can be customized using callbacks, removing the
  5. //    need to create a new SOM subclass in each part.
  6. //    
  7. //    Copyright (c) 1995 - 1996 by Apple Computer, Inc., all rights reserved.
  8. //-----------------------------------------------------------------------------
  9.  
  10. #ifndef _FW_OCyberPartExtension_
  11. #define _FW_OCyberPartExtension_
  12.  
  13. #include <CyberPartExtension.idl>
  14.  
  15. #pragma somemittypes reset
  16.  
  17. typedef somToken FW_HCyberPartInterfaceCallbacks;
  18.  
  19. module ODF
  20. {
  21.     interface FW_OCyberPartExtension : CyberPartExtension
  22.     {
  23.         // XXX passing a pointer to a SOM object. How does this work with
  24.         // DSOM? Who should own the pointed-to object?
  25.         void             SetCallbacks (in FW_HCyberPartInterfaceCallbacks callbacks);
  26.         void             DefaultOpenCyberItem (in CyberItem item, in ODPart openerPart, in ParameterSet openParams);
  27.         ODBoolean         DefaultHandleCommand (in long commandCreator, in long commandID, in ODFrame frame, in void* commandData);
  28.         
  29.         implementation
  30.         {
  31.             functionprefix = SLCyPart__;
  32.             
  33.             override:
  34.                 Release,
  35.                 OpenCyberItem,
  36.                 SetCyberItem,
  37.                 CanShowCyberItem,
  38.                 ShowCyberItem,
  39.                 GetCyberItemWindow,
  40.                 IsCyberItemSelected,
  41.                 AcquireSelectedCyberItems,
  42.                 IsURLSelected,
  43.                 GetSelectedURL,
  44.                 HandleCommand;
  45.             
  46.             releaseorder:
  47.                 SetCallbacks,
  48.                 DefaultOpenCyberItem,
  49.                 DefaultHandleCommand;
  50.             
  51.             majorversion = 1;
  52.             minorversion = 0;
  53.             
  54.             passthru C_xh =
  55.             "struct FW_SCyberPartExtensionCallbacks;"
  56.             "typedef FW_SCyberPartExtensionCallbacks* FW_HCyberPartInterfaceCallbacks;";
  57.             
  58.             passthru C_xih =
  59.             "#include \"SLCyPart.h\"";
  60.             
  61.             // data:
  62.             FW_HCyberPartInterfaceCallbacks fCallbacks;
  63.         };
  64.     };
  65. };
  66.  
  67. #endif // _FW_OCyberPartExtension_
  68.  
  69.